package com.ly.hotel.spainterface.jg.utils;

/**
 * Created by ThinkPad on 2018/2/10.
 */

public class AvoidDoubleClickedUtils {

    private static final int MIN_CLIC_DELY_TIME = 500;
    private static long lastClickedTime = 0;

    public static boolean isNotDoubleClicked(){
        long currentTime = System.currentTimeMillis();
        //Log.d("JgActivity","lastClickedTime=" + lastClickedTime + ",currentTime=" + currentTime +"currentTime-lastClickedTime=" + (currentTime-lastClickedTime));
        if((currentTime - lastClickedTime <= 500)){
            return true;
        }
        lastClickedTime = currentTime;
        return false;
    }
}
